package com.yunhe.java.others;

/**
 * Created by Administrator on 2017/7/21 0021.
 */
public class Yuan {
    public static void main(String[] args) {
        int r=15;
        for(int y=0;y<=2*r;y+=3){
            long x=Math.round(r-Math.sqrt(2*r*y-y*y));
            long longLength=2*(r-x);
       for(int i=0;i<=x;i++){
           System.out.print(" ");
       }
       System.out.print("*");
       for(int j=0;j<=longLength;j++) {
           System.out.print("*");
       }
       System.out.print("*");
        System.out.println();
        }
    }
}
